package com.fantasy.utils;

import javax.servlet.http.Cookie;

public class CookieUtils {

    public static String getCookie(String cookieName, Cookie[] cookies){
        String cookieValue = "0";
        for (Cookie cookie : cookies) {
            if (cookie.getName().equals(cookieName)){
                cookieValue = cookie.getValue();
                 break;
            }
        }
        return cookieValue;
    }
}
